<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>我的</title>
    <meta name="viewport" content="initial-scale=1, maximum-scale=1">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">

    <link rel="stylesheet" href="/static/wx/lib/sui/sm.min.css">
    <link rel="stylesheet" href="/static/wx/lib/sui/sm-extend.min.css">

    <link rel="stylesheet" href="/static/wx/css/reset.css">
    <link rel="stylesheet" href="/static/wx/css/main.css">
    <link rel="stylesheet" href="/static/wx/css/public_main.css">
</head>

<body>
    <div class="page-group">
        <div class="page page-current" id="mine">
            <!-- 标题栏 -->
            <!-- <header class="bar bar-nav"> -->
            <!-- <a class="icon pull-left">
                    <img src="imgs/icon/left.png" width="15" height="25">
                </a> -->
            <!-- <h1 class="title">融易拍</h1> -->
            <!-- </header> -->
            <!--工具栏-->
            <nav class="bar bar-tab">
                <a class="tab-item external" href="{:url('Index/index')}">
                    <img class="icon" src="/static/wx/imgs/img/home.png">
                    <span class="tab-label">首页</span>
                </a>
                {if($info.role_id == 1 || $info.role_id == 2)}
                <a class="tab-item external" {if ($info.role_id == 2)} href="{:url('Recordor/getByme')}" {else /} href="{:url('insurer/step1')}" {/if}>
                    <img class="icon" src="/static/wx/imgs/img/luru.png">
                    <span class="tab-label">录入</span>
                </a>
                {/if}
                {if($info.role_id == 3)}
                <a class="tab-item external" href="{:url('insurant/protectList')}">
                    <img class="icon" src="/static/wx/imgs/img/luru.png">
                    <span class="tab-label">核对资料</span>
                </a>
                {/if}
                {if($info.role_id != 4)}
                <a class="tab-item external"  href="{:url('message/getMessList')}">
                    <img class="icon" src="/static/wx/imgs/img/message.png">
                    <span class="tab-label">消息</span>
                    <span class="badge"></span>
                </a>
                {/if}
                <a class="tab-item external" href="{:url('User/person')}">
                    <img class="icon" src="/static/wx/imgs/img/mine_active.png">
                    <span class="tab-label">我的</span>
                </a>
            </nav>
            <!-- 主内容 -->
            <div class="content">
                <div class="avator-box">
                    <div class="avator-inner">
                        <div class="avator">
                            <img src="{$info.head_img}">
                        </div>
                        <div class="title-row">
                            <div class="avator-name size-n">{$info.username}</div>
                            <div class="avator-company">{$info.company_name}</div>
                        </div>
                    </div>
                    <div class="edit">
                        <img src="/static/wx/imgs/img/edit.png" width="25" />
                    </div>
                </div>
                <div>
                    <div class="list-block">
                        <ul>
                            <li>
                                <a href="{:url('User/userInfo')}" class="item-link item-content external">
                                    <div class="item-icon">
                                        <img src="/static/wx/imgs/img/self.png" width="25" />
                                    </div>
                                    <div class="item-inner">
                                        <div class="item-title">个人信息</div>
                                    </div>
                                </a>
                            </li>
                            {if($info.role_id != 4 && $info.role_id !=3)}
                            <li>
                                {if ($info.role_id == 1)}
                                     <a href="{:url('insurer/getList')}" class="item-link item-content external">
                                 {else /}
                                     <a href="{:url('recordor/alreadyList')}" class="item-link item-content external">
                                 {/if}
                                    <div class="item-icon">
                                        <img src="/static/wx/imgs/img/recorded.png" width="25" />
                                    </div>
                                    <div class="item-inner">
                                        <div class="item-title">已录资料</div>
                                    </div>
                                </a>
                            </li>
                            {/if}
                            <li>
                                <a href="{:url('message/getMessList')}" class="item-link item-content external">
                                    <div class="item-icon">
                                        <img src="/static/wx/imgs/img/em_mess.png" width="25" />
                                    </div>
                                    <div class="item-inner">
                                        <div class="item-title">我的消息</div>
                                    </div>
                                </a>
                            </li>
                            <!--<li>-->
                                <!--<a href="" class="item-link item-content">-->
                                    <!--<div class="item-icon">-->
                                        <!--<img src="/static/wx/imgs/img/change_pass.png" width="25" />-->
                                    <!--</div>-->
                                    <!--<div class="item-inner">-->
                                        <!--<div class="item-title">修改密码</div>-->
                                    <!--</div>-->
                                <!--</a>-->
                            <!--</li>-->
                        </ul>
                    </div>
                </div>
            </div>
        </div>

    </div>

    <script type='text/javascript' src='/static/wx/lib/sui/zepto.min.js' charset='utf-8'></script>
    <script type='text/javascript' src='/static/wx/lib/sui/sm.min.js' charset='utf-8'></script>
    <script type='text/javascript' src='/static/wx/lib/sui/sm-extend.min.js' charset='utf-8'></script>
    <script>
        $('.edit').on('touchend',function(){
            window.location.href = '/wx/index/setting';
        });
        function checkMsg(){
            var html = '';
            $.ajax({
                url:'/wx/index/check_msg',
                type:'post',
                dataType:'json',
                data:{},
                success:function (data) {
                    if(data.code ==200){
                        if(data.data > 0){
                            html = data.data;
                        }else{
                            html = '暂无';
                        }
                        $('.badge').html(html);
                    }else{
                        $.alert(data.msg);
                    }
                }
            });
        }
        setInterval('checkMsg()',2000);
    </script>
</body>

</html>